//
//  ImageCell.m
//  COJoke
//
//  Created by carlosk on 14/12/23.
//  Copyright (c) 2014年 carlosk. All rights reserved.
//

#import "ImageCell.h"
#import "UIImageView+WebCache.h"
@interface ImageCell()
@property(nonatomic,strong)IBOutlet UIImageView *iv;

@end

@implementation ImageCell


//创建的时候被调用
-(void)createViews{
    [super createViews];
}
-(void)createData{
    [super createData];
}
//点击了某个按钮
-(BOOL)onClick:(UIView *)sender{
    return NO;
}
//Cell的高度 子类必须要实现。Cell的高度要在cell类里调整
+(NSNumber * )getCellHeight:(id)item withIndexPath:(NSIndexPath *)indexPath{
    return @300.f;
}
//section底部的高度
+(NSNumber * )heightForFooterInSection:(id)items withSection:(NSInteger)section{
    return @0.f;
}
//setion的头部的高度
+(NSNumber * )heightForHeaderInSection:(id)items withSection:(NSInteger)section{
    return @0.f;
}
//默认是屏幕的宽度
+(float )getCellWidth{
    return kFBaseWidth;
}

- (void)fillData:(ImageCellModel *)item withIndexPath:(NSIndexPath *)indexPath{
    [super fillData:item withIndexPath:indexPath];
//    self.iv.image = [UIImage imageNamed:item.imageName];
    [self.iv sd_setImageWithURL:[NSURL URLWithString:item.imageUrl] placeholderImage:nil];
}


@end
